<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Menu
 *
 * @author dliebel
 */
namespace Application\Form; 

 
use Zend\Form\Form; 

class FormMenu extends Form 

{ 
    public function __construct($name = null) 
    { 
        parent::__construct($name); 
        
        $this->setAttribute('method', 'post'); 
        
        $this->add(array( 
            'name' => 'id', 
            'type' => 'Zend\Form\Element\Hidden', 
            'attributes' => array( 
                'id' => 'id', 
            ), 
            'options' => array( 
                'label' => 'undefined', 
            ), 
        ));
        
        $this->add(array( 
            'name' => 'titulo', 
            'type' => 'Zend\Form\Element\Text', 
            'attributes' => array( 
                'class' => 'form-control', 
                'id' => 'titulo', 
                'placeholder' => 'ingrese el título del Menú', 
                'required' => 'required', 
            ), 
            'options' => array( 
                'label' => 'Título:', 
            ), 
        )); 
 
        $this->add(array( 
            'name' => 'descripcion', 
            'type' => 'Zend\Form\Element\Text', 
            'attributes' => array( 
                'class' => 'form-control', 
                'id' => 'descripcion', 
                'placeholder' => 'ingrese una descripción del Menú', 
                'required' => 'required', 
            ), 
            'options' => array( 
                'label' => 'Descripción:', 
            ), 
        )); 
 
        $this->add(array( 
            'name' => 'comando', 
            'type' => 'Zend\Form\Element\Text', 
            'attributes' => array( 
                'class' => 'form-control', 
                'id' => 'comando', 
                'placeholder' => 'comenado', 
                'required' => 'required', 
            ), 
            'options' => array( 
                'label' => 'Comando:', 
            ), 
        )); 
 
        $this->add(array( 
            'name' => 'menuPadreId', 
            'type' => 'Zend\Form\Element\Select', 
            'attributes' => array( 
                'class' => 'form-control', 
                'id' => 'menuPadreId', 
                'required' => 'required', 
                'value' => '1', 
            ), 
            'options' => array( 
                'label' => 'Ingrese menú padre', 
                'value_options' => array(
                    '0' => 'SIN DEFINIR', 
                ),
            ), 
        )); 
 
         
 
    
        
        
         $this->add(array(
             'name' => 'ok',
             'type' => 'Submit',
             'attributes' => array(
                 'class' => 'btn btn-primary', 
                  'value' => 'OK',
                 'id' => 'submitbutton',
             ),
         ));
         
         $this->add(array(
             'name' => 'cancelar',
             'type' => 'button',
             'attributes' => array(
                 'class' => 'btn btn-default', 
                 'value' => 'CANCELAR',
                 'id' => 'cancelbutton',
             ),
         ));
        
        
    } 
} 